<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="/iuie-tag"%>
<%@ taglib prefix="sys" uri="/sys-tag" %>
<%@ taglib prefix="lui" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户设置模板</title>
</head>
<lui:context/>
<u:View basePath="/res-system/setting" userJS="userSettingTemplate" delayLoadJs="false">
<body>
<lui:boards>
    <lui:board width="100%" boardTitle="用户设置模板">
    	<sys:dropCodeSet codeTypes="valueType" id="codeSet"/>
        <form id="userSettingTemplateFrm" class='m-cust'>
        	<div class="form-group row m-narrow">
			    <div class="col-sm-3 col-md-3 col-xs-3">
			    	<div class="input-group">
					    <label for="resName" class="input-group-addon">模板名称</label>
					    <input name="resName" id="resName" type="text" class="form-control">
					</div>
			    </div>
			    <div class="col-sm-3 col-md-3 col-xs-3">
			    	<div class="input-group">
					    <label for="resExt1" class="input-group-addon">模板Key</label>
					    <input name="resExt1" id="resExt1" type="text" class="form-control">
					</div>
			    </div>
			    <div class="col-sm-3 col-md-3 col-xs-3">
			    	<div class="input-group">
					    <label for="enabled" class="input-group-addon">是否启用</label>
					    <select name="enabled" id="enabled" class="form-control m-input">
						    <option value="">请选择</option>
						    <option value="0">禁用</option>
						    <option value="1">启用</option>
						</select>
					</div>
			    </div>
			</div>
        	<div class="form-horizontal">
			    <div class="form-group">
			        <div class="col-md-12 col-sm-12">
			            <div class="btn-group" id="buttonGro">
							<button type="button" class="btn btn-primary" onclick="UserSettingTemplatePage.findByPage()"><i class='fa fa-fw fa-search'></i>查询</button>
			                <button type="button" class="btn btn-info" onclick="UserSettingTemplatePage.addUserSettingTemplate()"><i class='fa fa-fw fa-plus'></i>新增</button>
			                <button type="reset" class="btn btn-default"><i class='fa fa-fw fa-repeat'></i>重置</button>
			        	</div>
			        </div>
			    </div>
			</div>
        	<u:dropListView id="dropView_oper">
			    <u:dropView name="update" template="edit" onClick="UserSettingTemplatePage.update" title="修改"/>
			    <u:dropView name="deleteTemplate" template="delete" onClick="UserSettingTemplatePage.delete" title="删除"/>
			</u:dropListView>
			<u:dropList id="drop_enabled">
				<u:dropItem value="1" text="启用" className="m-color-dark-green"/>
				<u:dropItem value="0" text="禁用" className="m-color-dark-red"/>
			</u:dropList>
			<u:dataSet id="userSettingTemplateSet">
				<u:dataField name="resId" display="资源ID" visiable="false"/>
				<u:dataField name="resName" display="模板名称"/>
				<u:dataField name="resExt1" display="模板Key"/>
				<u:dataField name="resDesc" display="资源描述"/>
				<u:dataField name="resExt2" display="值类型" dropdown="codeSet.valueType"/>
				<u:dataField name="enabled" display="是否启用" dropdown="drop_enabled" width="60px"/>
				<u:dataField name="oper" display="操作" dropView="dropView_oper"/>
			</u:dataSet>
			<!-- 获取用户设置模板信息列表ajax -->
			<lui:ajax id="findLstAjax" url="${ctx }/setting/template/find/page" formQuery="#userSettingTemplateFrm"/>
			<lui:datatable id="datatable" ajax="findLstAjax" sortable="true" pagination="pagination" dataset="userSettingTemplateSet" checkable="true"
			    multiple="false" cutLine="true"/>
			<lui:pagination datatable="datatable" id="pagination" pageSize="15" pageChoice="15" showPageChoice="false"/>
			<lui:ajax id="deleteByIdAjax" url="${ctx }/setting/template/delete" onSuccess="UserSettingTemplatePage.onDelSucc" type="post" 
				contentType="application/x-www-form-urlencoded"/>
        </form>
    </lui:board>
</lui:boards>
</body>
</u:View>
</html>